# -*- coding:utf-8 -*-

'''
PROJECT_NAME : python_高级
file    : 属性查找顺序
author  : 1032162439@qq.com
date    : 2022-11-08 13:33
IDE     : PyCharm
'''


class Descriptor:
    """
    非数据描述符
    """

    def __get__(self, instance, owner):
        return "不管你是谁，我都是你老子！"


class Hero:
    """
    实体类
    """
    # 类属性，值为数据描述符
    name = Descriptor()


def main():
    # 实例化
    luban = Hero()
    print(luban.__dict__)
    print('name' in Hero.__dict__)
    print(luban.name)


if __name__ == '__main__':
    main()
